<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/plugins/datagrid-detailview.js"></script>
 <script type="text/javascript">
 $(function(){ 
	 $('#favorite').datagrid({
		 pageList:[10]
	 	});
	 
	 $('#favorite').datagrid({
		 view: detailview,
		 detailFormatter:function(index,row){
		 return '<div style="padding:2px"><table class="ddv"></table></div>';
		 },
		 onExpandRow: function(index,row){
		 var ddv = $(this).datagrid('getRowDetail',index).find('table.ddv');
		 ddv.datagrid({
			 url:'${pageContext.request.contextPath}/custome/getCustomersJson/'+ row.houseId +'.html',
		 	fitColumns:true,
		 	singleSelect:true,
		 	loadMsg:'正在加载...',
		 	height:'auto',
		 	columns:[[
				 {field:'cus_name',title:'姓名',width:100},
				 {field:'cus_level',title:'级别',width:100},
				 {field:'cus_status',title:'状态',width:100},
				 {field:'cus_type',title:'类型',width:100},
				 {field:'createTime',title:'时间',width:100}
			 ]],
			 onResize:function(){
				   $('#favorite').datagrid('fixDetailRowHeight',index);
				  },
			  onLoadSuccess:function(){
				  setTimeout(function(){
				  $('#favorite').datagrid('fixDetailRowHeight',index);
				  },0);
				  }
			 });
		   }
		 });
	 

 })

</script>   
 <div class="easyui-tabs" style="width:auto;height:auto">
	<div title="收藏列表" style="padding:10px">
		<table id="favorite" class="easyui-datagrid" style="width:auto;height:600px"
					url="${pageContext.request.contextPath}/house/viewListJson/favorite.html"
					singleSelect="true"
					pagination="true"
					pagePosition="both"
					fitColumns="true"
					>
			    <thead>
				    <tr>
				    <th data-options="field:'number',width:200">房屋编号</th>
				   	<th data-options="field:'area',width:100">区域</th>
				   	<th data-options="field:'bankuai',width:100">板块</th>			    
				    <th data-options="field:'status',width:100">状态</th>
				 	<th data-options="field:'type',width:100">房屋类型</th>
				    <th data-options="field:'title',width:100">简单描述</th>
				    <th data-options="field:'age',width:100">建造年代</th>
				 	<th data-options="field:'face',width:100">朝向</th> 
				 	<th data-options="field:'size',width:100">面积(m2)</th>  			 	
				   	<th data-options="field:'room',width:100">房间</th>
				   	<th data-options="field:'ting',width:100">厅</th>
				   	<th data-options="field:'wei',width:100">卫生间</th>
					<th data-options="field:'price',width:100">价格(万元)</th> 
				   	<th data-options="field:'bsr',width:100">购买/出售/出租/求租</th>
				   	<th data-options="field:'way',width:100">支付方式</th>
				   	<th data-options="field:'time',width:300">创建时间</th>
				    </tr>
			    </thead>
		    </table>
		</div>
	</div>

